# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=audiocd-kio
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.kde.org/applications/multimedia/"
pkgdesc="Kioslave for accessing audio CDs"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kconfig-dev ki18n-dev kdoctools-dev kio-dev kcmutils-dev libkcddb-dev libkcompactdisc-dev cdparanoia-dev flac-dev libvorbis-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/audiocd-kio-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="197a8c8ed9b8dc9392c9bb274073c33c4f0c40fddf6061d092529f16405df0cbee93f3a2a8405157fbd35958344085eac9ee4b9699e06a96f22c52b9512dddd3  audiocd-kio-20.04.3.tar.xz"
